var express = require('express');
var router = express.Router();


const {getClaims,addClaims,modifyClaims,delClaims} = require('../service/claimsService')

//获取理赔
router.get('/getSaleClaims',async function(req, res, next) {
  res.send(await getClaims(req.query))
});


//添加理赔
router.post('/addSaleClaims',async function(req, res, next) {
  res.send(await addClaims(req.body))
});

// 修改理赔
router.post('/updataSaleClaims',async function(req, res, next) {
  res.send(await modifyClaims(req.body))
});

//删除理赔
router.post('/delSaleClaims',async function(req, res, next) {
  res.send(await delClaims(req.body))
});

module.exports = router;